package com.itboye.mengwu.app.logincontroller;

import android.app.Activity;
import android.content.Intent;

import com.itboye.mengwu.app.ui.aiwujia.RedBagActivity;
import com.itboye.mengwu.app.ui.aizhiwu.AizhiwuMengShiGuangItemFragment;
import com.itboye.mengwu.app.ui.aizhiwu.GeRenActivity;
import com.itboye.mengwu.app.ui.aizhiwu.MengShiGuangDetailActivity;
import com.itboye.mengwu.app.ui.main.GoodsDetailActivity;
import com.itboye.mengwu.app.ui.mymeng.ActivityGeRenData;
import com.itboye.mengwu.app.ui.mymeng.ActivityGuanZhu;
import com.itboye.mengwu.app.ui.mymeng.ActivityMyBalance;
import com.itboye.mengwu.app.ui.mymeng.ActivityYouHuiQuan;
import com.itboye.mengwu.app.ui.mymeng.MePingJiaFragment;
import com.itboye.mengwu.app.ui.mymeng.MessageActivity;
import com.itboye.mengwu.app.ui.mymeng.MyBoyActivity;
import com.itboye.mengwu.app.ui.mymeng.MyMengBiActivity;
import com.itboye.mengwu.app.ui.mymeng.MyMengMeZengSongActivity;
import com.itboye.mengwu.app.ui.mymeng.MyOrderActivity;
import com.itboye.mengwu.app.ui.mymeng.MyTieZiActivity;
import com.itboye.mengwu.app.ui.mymeng.personsettings.AddressManageActivity;
import com.itboye.mengwu.app.ui.web.WebActivity;
import com.itboye.mengwu.buy.ui.QueryAllOrder;
import com.itboye.mengwu.collection.CollectionFragment;
import com.itboye.mengwu.main.WoMengFragment;

/***
 * 
 * @author 在登录状态下执行该方法
 * 
 */
public class LoginedState implements ILoginState {

	// 状态为登录的时候执行本类里的方法
	@Override
	public void test(Activity activity, Object obj) {
		// TODO Auto-generated method stub

	}

	@Override
	public void goToMyMessage(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, ActivityGeRenData.class);
		activity.startActivityForResult(intent, 101);
	}

	/***
	 * 跳转到换购
	 */
	@Override
	public void getHuan(Activity activity, String obj, String obj2) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, WebActivity.class);
		intent.putExtra("title", obj);
		intent.putExtra("url", obj2);
		activity.startActivity(intent);// , requestCode)
	}

	/***
	 * 跳转到我的帖子
	 */
	@Override
	public void getMyTieZi(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, MyTieZiActivity.class);
		activity.startActivity(intent);

	}

	// 余额
	@Override
	public void getMyOrder(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, MyOrderActivity.class);
		intent.putExtra("index", 3);
		activity.startActivity(intent);

	}

	// 评价
	@Override
	public void getPingjia(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, MyOrderActivity.class);
		intent.putExtra("index", 2);
		activity.startActivity(intent);
	}

	// 售后
	@Override
	public void getShouHuo(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, MyOrderActivity.class);
		intent.putExtra("index", 1);
		activity.startActivity(intent);

	}

	// 付款
	@Override
	public void getFukuan(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, MyOrderActivity.class);
		intent.putExtra("index", 0);
		activity.startActivity(intent);
	}

	// 地址
	@Override
	public void getAddress(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, AddressManageActivity.class);
		activity.startActivity(intent);
	}

	// 余额
	@Override
	public void getSmol(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, ActivityMyBalance.class);
		activity.startActivity(intent);
	}

	// 红包
	@Override
	public void getRed(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, RedBagActivity.class);
		activity.startActivity(intent);
	}

	// 萌币
	@Override
	public void getMengBi(Activity activity, String obj, String obj2) {
		// TODO Auto-generated method stub
		Intent intent3 = new Intent(activity, WebActivity.class);
		intent3.putExtra("title", obj);
		intent3.putExtra("url", obj2);
		activity.startActivity(intent3);
	}

	// 收藏
	@Override
	public void collection(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		((GoodsDetailActivity) activity).collection();
	}

	@Override
	public void onlickShouCang(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		// ((MyTieZiActivity) activity).onlickShouCang();
	}

	@Override
	public void queryMyCollection(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, CollectionFragment.class);
		activity.startActivity(intent);
	}

	@Override
	public void queryShopCart(Activity act, Object obj) {
		// TODO Auto-generated method stub
		// ((MainActivity)act).collection();
	}

	/**
	 * 全消息
	 */
	@Override
	public void QuanMessgeDate(Activity act, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, MessageActivity.class);
		act.startActivity(intent);
	}

	@Override
	public void gerenKongJian(Activity act, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, GeRenActivity.class);
		intent.putExtra("uid", obj + "");
		act.startActivity(intent);
	}

	@Override
	public void guanzhu(Activity act, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, ActivityGuanZhu.class);
		act.startActivity(intent);
	}

	@Override
	public void woDeDongTai(Activity act, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, MyBoyActivity.class);
		act.startActivity(intent);
	}

	/***
	 * 我的评价
	 */
	@Override
	public void MePingjia(Activity act, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, MePingJiaFragment.class);
		act.startActivity(intent);
	}

	@Override
	public void getDaiJinQuan(Activity activity, Object obj) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, ActivityYouHuiQuan.class);
		activity.startActivity(intent);
	}

	@Override
	public void onButton(Activity act, Object obj) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mengTime(Activity act, Object data) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, MyMengMeZengSongActivity.class);
		// intent.putExtra("title", "时光机");
		// intent.putExtra("url",
		// "http://www.moodwo.com/index.php/webview/invite/index");
		act.startActivity(intent);
	}

	@Override
	public void InvitationPrize(Activity activity, String obj, String obj2) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, WebActivity.class);
		intent.putExtra("title", obj);
		intent.putExtra("url", obj2);
		activity.startActivity(intent);// , requestCode)
	}

	@Override
	public void Help(Activity activity, String obj, String obj2) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, WebActivity.class);
		intent.putExtra("title", obj);
		intent.putExtra("url", obj2);
		activity.startActivity(intent);// , requestCode)
	}

	@Override
	public void vip(Activity activity, String obj, String obj2) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(activity, WebActivity.class);
		intent.putExtra("title", obj);
		intent.putExtra("url", obj2);
		activity.startActivity(intent);
	}

	// @Override
	// public void guanzhuOther(Activity act, Object obj) {
	// // TODO Auto-generated method stub
	//
	// }
	@Override
	public void MyAllOrder(Activity act, Object data) {
		// TODO Auto-generated method stub
		Intent intent = new Intent(act, QueryAllOrder.class);
		act.startActivity(intent);
	}
}
